<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>	</title>
	<script type="text/javascript">
		window.onload= function () {

			imglist = ['a.jpg','bb.jpg','ff.jpg']
			
			setInterval(run,1000);

			img = document.getElementById('img')

			num = 0;

			function run() {
				
				img.src = imglist[num];

				num++;

				if(num==imglist.length){
					num =0;
				}
			}

		}
	</script>
</head>
<body>
	<img id="img" src="a.jpg">
</body>
</html>